package com.example.demo.test.akka;

import akka.actor.UntypedActor;

/**
 * @auth
 **/
public class Greeter extends UntypedActor {
    public static enum Msg{
        GREET,DONE;
    }
    @Override
    public void onReceive(Object msg) throws Exception {
        if(msg == Msg.GREET){
            System.out.println("Hello World! first akka");
            getSender().tell(Msg.DONE,getSelf());
        }else {
            unhandled(msg);
        }
    }
}
